<%@ page import="com.ant.myagile.backlog.UserStory" %>



<div class="fieldcontain ${hasErrors(bean: userStoryInstance, field: 'description', 'error')} required">
	<label for="description">
		<g:message code="userStory.description.label" default="Description" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="description" required="" value="${userStoryInstance?.description}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userStoryInstance, field: 'value', 'error')} required">
	<label for="value">
		<g:message code="userStory.value.label" default="Value" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="value" type="number" value="${userStoryInstance.value}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: userStoryInstance, field: 'issues', 'error')} ">
	<label for="issues">
		<g:message code="userStory.issues.label" default="Issues" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${userStoryInstance?.issues?}" var="i">
    <li><g:link controller="issue" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="issue" action="create" params="['userStory.id': userStoryInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'issue.label', default: 'Issue')])}</g:link>
</li>
</ul>

</div>

